//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#ifndef NATIVE_SYSTEM_BASE_COLLECTION_H
#define NATIVE_SYSTEM_BASE_COLLECTION_H

#ifndef NATIVE_SYSTEM_BASE_ATOM_H
#include "System/Base/Atom.h"
#endif
#ifndef NATIVE_SYSTEM_BASE_EXCEPTIONS_H
#include "System/Base/Exceptions.h"
#endif

namespace Native { namespace System
{
    //****************************************************************************************************************//
    //Collecion
    //
    //****************************************************************************************************************//
    NATIVE_DECLARE_CONST_OBJECT(CCollection, C_COLLECTION);
    class NATIVE_LIBRARY_EXPORT CCollection :
        public CObject
    {
    protected:
        CCollection();
        CCollection(C_COLLECTION& that);
        CCollection(C_COLLECTION&& that);
        virtual ~CCollection();

    public:
        virtual size_t Count() const;
        virtual bool Empty() const;
        virtual void Clear();
    };
    //****************************************************************************************************************//
    //CEmptyCollectionException
    //
    //****************************************************************************************************************//
    NATIVE_DECLARE_CONST_OBJECT(CEmptyCollectionException, C_EMPTY_COLLECTION_EXCEPTION);
    class NATIVE_LIBRARY_EXPORT CEmptyCollectionException :
        public CException
    {
        NATIVE_DECLARE_OBJECT;

        static void Check(
            C_SCENE& scene,
            C_COLLECTION& collection,
            WSTRING& arguments = EMPTY_STRING,
            WSTRING& detail = EMPTY_STRING) throw();
        
    protected:
        CEmptyCollectionException();

    public:
        CEmptyCollectionException(C_EMPTY_COLLECTION_EXCEPTION& that);
        CEmptyCollectionException(C_EMPTY_COLLECTION_EXCEPTION&& that);
        CEmptyCollectionException(
            C_SCENE& scene,
            WSTRING& arguments = EMPTY_STRING,
            WSTRING& detail = EMPTY_STRING);
    };
}}

#endif